package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 病虫害表
 *
 * @author code-generate
 * @date 2022-01-05
 */
@Data
@DbTable(tableName = "t_disease")
public class Disease extends BaseEntity {
        /**
     * 名称
     */
    @DbTableField(columnName = "c_name", dbType = DbTypeEnum.VARCHAR)
    public String name ;

    /**
     * 类型 1 虫害  2 病害  0 其他
     */
    @DbTableField(columnName = "c_type", dbType = DbTypeEnum.INTEGER)
    public Integer type ;

    /**
     * 分布与危害
     */
    @DbTableField(columnName = "c_desc", dbType = DbTypeEnum.VARCHAR)
    public String desc ;

    /**
     * 病原/形态特征
     */
    @DbTableField(columnName = "c_pathogeny", dbType = DbTypeEnum.VARCHAR)
    public String pathogeny ;

    /**
     * 发生规律
     */
    @DbTableField(columnName = "c_law", dbType = DbTypeEnum.VARCHAR)
    public String law ;

    /**
     * 防治方法
     */
    @DbTableField(columnName = "c_cure", dbType = DbTypeEnum.VARCHAR)
    public String cure ;

    /**
     * 危害对象
     */
    @DbTableField(columnName = "c_obj_name", dbType = DbTypeEnum.VARCHAR)
    public String objName ;

    /**
     * 备注
     */
    @DbTableField(columnName = "c_remark", dbType = DbTypeEnum.VARCHAR)
    public String remark ;

    /**
     * 修改人 
     */
    @DbTableField(columnName = "c_db_update_id", dbType = DbTypeEnum.INTEGER)
    public Integer dbUpdateId ;

    /**
     * 修改时间
     */
    @DbTableField(columnName = "c_db_update_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime dbUpdateDate ;

    @ApiModelProperty(value = "附件")
    private List<DiseaseFile> fileList;

    @ApiModelProperty(value = "月份数组")
    private Integer[] months;

}
